/**
 Copyright will be fixed soon.
 Author: Hiroshi Ota.
 $Date: $
 $Revision: $
*/

#ifndef _BF_DRIVE_CONTROL_H_
#define _BF_DRIVE_CONTROL_H_

#include "IBFArgorithm.h"
//#include "IBFBehaviorControl.h"

class IBFBehaviorControl;
class Motor;

class BFDriveControl :
	public IBFArgorithm
{
public:
	BFDriveControl(IBFBehaviorControl* bc);
	~BFDriveControl(void);

	void updateDrive(Motor* motor, BFState::DriveDir dir, unsigned char level);

	// default implementation of cruise drive argorithm
	int execute(unsigned int loopTick, BFState* state);

protected:
	IBFBehaviorControl* context;

	// Map of BFState::StairingDir -> BFstate::DriveDir
	static BFState::DriveDir sdMap[4];
};

#endif // _BF_DRIVE_CONTROL_H_
